#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int arr[2][5] = { 0 };
	int i, j, m, n;
	for (i = 0;i < 2;i++)
	{
		for (j = 0;j < 5;j++)
		{
			scanf("%d", &arr[i][j]);
		}
	}
	for (m = 0;m < 2;m++)
	{
		for (n = 0;n < 5;n++)
		{
			printf("%d ", arr[m][n]);
		 }
		printf("\n");
	}
	return 0;
}